package com.csaba.swing.gui.wizard;

import java.util.HashMap;
import java.util.Map;

public class WizardContext
{
	private final WizardDialog dialog;
	private final Map<String, Object> properties = new HashMap<String, Object>();

	public WizardContext( final WizardDialog dialog )
	{
		super();
		this.dialog = dialog;
	}

	public WizardDialog getDialog()
	{
		return dialog;
	}

	public WizardModel getWizardModel()
	{
		return dialog.getWizardModel();
	}

	public Object getProperty( final String key )
	{
		return properties.get(key);
	}

	public Object removeProperty( final String key )
	{
		return properties.remove(key);
	}

	public void setProperty( final String key, final Object value )
	{
		properties.put(key, value);
	}
}
